/*
	LCD Header File
	Updated: 2/1/08
	
	Created By: Jared Bayne
	E-Mail:		JaredNBayne@gmail.com
	Created On:	February 1st, 2008

	Purpose:	This file will define all the constants
				and functions for the LCD screen built
				into the Olimex development board.


*/

#ifndef _LCD_H
#define _LCD_H
#include "string.h"


#define		EON						PORTC |= (1<<2)
#define		EOFF					PORTC &= ~(1<<2)
#define		RSON					PORTC |= (1<<0)
#define		RSOFF					PORTC &= ~(1<<0)


 
#define		LCD_CHAR_SPEED			2
#define		timeout					250  

#define		DISP_ON				0b00001100	//LCD control constants
#define		DISP_OFF			0b00001000	//
#define		CLR_DISP			0b00000001	//
#define		CUR_HOME			0b00000010	//
#define		ENTRY_INC			0b00000110	//
#define		DD_RAM_ADDR			0b10000000	//
#define		DD_RAM_ADDR2		0b11000000	//  
#define		DD_RAM_ADDR3		40		//      
#define		CG_RAM_ADDR			0b01000000	// 

const unsigned short int DEBUGGING = 1;

void LCDdispMSGNEW(char msg[], int length);
void LCDdispMSG(char msg[], int length);
void LCDDispInt(int temp);
void LCDDispInt6(int temp);
void InitLCD(void);
void LCDLine2(void);
void LCDClear(void);
void LCDdispCHAR(char msg);
void write(char * str);
void writeln(char * str); //Clears screen then displays message
void LCDDisp6BitBinary(int binary);

//Global variables
unsigned char data;

#include "LCD.c"

#endif
